<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page session="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>writeform.jsp</title>
<SCRIPT src="<c:url value="/resources/jquery-1.8.2.js"/>" language="javascript"></SCRIPT>
</head>
<body>
<h3>글쓰기</h3>
<hr><br>
<form id="g_writeform" method="post" action="g_write">
name : <input type="text" id="name" name="name"><br>
content : 
<textarea name="content" id="content" cols="50" rows="6"></textarea><br>
<input type="button" id="okBtn" value="확인">
</form>

<script type="text/javascript">
<!--
	$(document).ready(function() { 
		$('#okBtn').click(
			function(){ 
				if($('#name').val() == ''){
					alert('이름을 입력하지 않았습니다.');
					return;
				}
				if($('#content').val() == ''){
					alert('내용을 입력하지 않았습니다.');
					return;
				}
				$('#g_writeform').submit();
			}
		);
	});

-->
</script>
</body>
</html>